package com.bugu.service.customer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.orm.Page;
import org.springside.modules.orm.hibernate.EntityManager;

import com.bugu.dao.customer.CompanyDao;
import com.bugu.entity.customer.Company;
@Service
//默认将类中的所有函数纳入事务管理.
@Transactional
public class CompanyManager extends EntityManager<Company, Long> {

	@Autowired
	private CompanyDao companyDao = null;
	@Override
	protected CompanyDao getEntityDao() {
		// TODO Auto-generated method stub
		return companyDao;
	}
	public Page<Company> findByUser(Page<Company> page,String loginName){
		companyDao.findByUser(page, loginName);
		return page;
	}

}
